﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.ComponentModel;

namespace System.Data.DataSetGenerator
{
    [Serializable]
    [XmlType("DataAdapters")]
    public sealed class DataAdaptersSection
        : IDataAdapterOptions
    {
        public DataAdaptersSection()
        {
            Util.InitializeObject(this);
        }

        [DefaultValue(false)]
        [XmlAttribute]
        public bool GenerateDataAdapters { get; set; }

        [DefaultValue("")]
        [XmlAttribute]
        public String DataAdaptersFileName { get; set; }

        [DefaultValue("")]
        [XmlAttribute]
        public String DataAdaptersNamespace { get; set; }

        [DefaultValue(UpdateRowSource.FirstReturnedRecord)]
        [XmlAttribute]
        public UpdateRowSource UpdatedRowSource { get; set; }

        [DefaultValue(ConflictOption.CompareRowVersion)]
        [XmlAttribute]
        public ConflictOption ConflictOption { get; set; }

        [DefaultValue(true)]
        [XmlAttribute]
        public bool IgnoreComputedColumnsForInsertAndUpdate { get; set; }

        [DefaultValue("")]
        [XmlAttribute]
        public String BaseClass { get; set; }
    }
}
